import React, {useState, useEffect } from "react";
import { clinList } from "../tabFile/api";
/**
 *       cityId: "110100",
      ticketFlag: 1,
      k: 2185957,
 * **/
const App = () => {
  // 
  const [name, setname] = useState('kerwin');
  useEffect(() => {
    clinList({
      cityId: "310100",
      ticketFlag: 1,
      type:1,
      pageNum:1,
      pageSize:10,
      k: 6641200,
    }).then((e) => {
      console.log(e);
    });
    setname(name.substring(0,1).toLocaleUpperCase()+name.substring(1))
    return () => {
      // 相当于组件销毁时执行
    };
  }, []); // 传空值代表的是不依赖任何其他state,存放变化的数值
  return <div>App
    {name}
  </div>;
};

export default App;
